package com.backstage.jwt;

import com.backstage.entity.UserEntity;
import org.apache.shiro.authc.AuthenticationToken;

/**
 * Created by cynic on 2018/4/13.
 */
public class JWTToken implements AuthenticationToken {
    private Object principal;
    private Object credentials;
    private boolean isLogin;
    private String token;// 密钥
    private Long expireTime;//过期时间
    private UserEntity userEntity;
    private String provider;

    public JWTToken(Object principal, Object credentials) {
        this.principal = principal;
        this.credentials = credentials;
    }

    public String getProvider() {
        return provider;
    }

    public void setProvider(String provider) {
        this.provider = provider;
    }

    public Object getPrincipal() {
        return principal;
    }

    public Object getCredentials() {
        return credentials;
    }

    public boolean isLogin() {
        return isLogin;
    }

    public Long getExpireTime() {
        return expireTime;
    }

    public void setExpireTime(Long expireTime) {
        this.expireTime = expireTime;
    }

    public void setLogin(boolean login) {
        isLogin = login;
    }

    public void setPrincipal(Object principal) {
        this.principal = principal;
    }

    public void setCredentials(Object credentials) {
        this.credentials = credentials;
    }

    public UserEntity getUserEntity() {
        return userEntity;
    }

    public void setUserEntity(UserEntity userEntity) {
        this.userEntity = userEntity;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }
}
